package com.audaque.springboot.foshanupload.session.listener;


import com.audaque.springboot.foshanupload.authcore.model.currentUser.TransmittableThreadLocalCurrentUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.session.events.SessionExpiredEvent;
import org.springframework.stereotype.Component;


/**
 * session事件监听器
 *
 * @author zgb
 */
@Slf4j
@Component
public class SessionExpiredEventListener implements ApplicationListener<SessionExpiredEvent> {


    @Override
    public void onApplicationEvent(SessionExpiredEvent event) {
        log.debug("SessionExpiredEvent");
        TransmittableThreadLocalCurrentUser transmittableThreadLocalCurrentUser = TransmittableThreadLocalCurrentUser.getCurrentUser();
        log.debug("transmittableThreadLocalCurrentUser :" + transmittableThreadLocalCurrentUser);

    }
}
